Run download_data.Rmd and percentage_of_regional_richness.Rmd First!
merlin_city_data <- fetch_city_data_for('merlin')
── Column specification ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
cols(
name = col_character(),
response = col_double()
)
Joining, by = "name"
merlin_city_data
library(tidyverse)
Registered S3 methods overwritten by 'dbplyr':
method from
print.tbl_lazy
print.tbl_sql
── Attaching packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.1 ──
✓ tibble 3.1.2 ✓ dplyr 1.0.7
✓ tidyr 1.1.3 ✓ stringr 1.4.0
✓ readr 1.4.0 ✓ forcats 0.5.1
✓ purrr 0.3.4
── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
x dplyr::combine() masks randomForest::combine()
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
x ggplot2::margin() masks randomForest::margin()
merlin_city_data_fixed <- rfImpute(response ~ ., merlin_city_data)
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 16.77 93.05 |
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 16.31 90.48 |
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 17.04 94.52 |
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 16.38 90.88 |
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 17.2 95.43 |
merlin_city_data_fixed
randomForest(response ~ ., merlin_city_data_fixed)
Call:
randomForest(formula = response ~ ., data = merlin_city_data_fixed)
Type of random forest: regression
Number of trees: 500
No. of variables tried at each split: 17
Mean of squared residuals: 16.40603
% Var explained: 8.99
select_variables_from_random_forest(merlin_city_data_fixed)
[1] "merlin_pool_size" "realm" "biome_name"
[4] "happiness_positive_effect" "rainfall_monthly_min" "region_20km_urban"
[7] "temperature_annual_average" "region_20km_elevation_delta" "region_20km_cultivated"
[10] "temperature_monthly_min" "region_50km_urban" "happiness_future_life"
[13] "region_50km_elevation_delta" "shrubs" "permanent_water"
[16] "city_gdp_per_population" "region_100km_cultivated" "region_50km_cultivated"
[19] "region_50km_average_pop_density" "happiness_negative_effect" "region_100km_urban"
[22] "region_100km_elevation_delta" "region_20km_average_pop_density" "share_of_population_within_400m_of_open_space"
[25] "city_average_pop_density" "herbaceous_wetland" "rainfall_annual_average"
[28] "region_100km_average_pop_density" "temperature_monthly_max" "rainfall_monthly_max"
[31] "mean_population_exposure_to_pm2_5_2019" "city_max_pop_density" "city_elevation_delta"
[34] "cultivated" "city_mean_elevation" "percentage_urban_area_as_open_public_spaces"
[37] "herbaceous_vegetation" "urban" "population_growth"
[40] "percentage_urban_area_as_open_public_spaces_and_streets" "open_forest" "percentage_urban_area_as_streets"
[43] "closed_forest"
select_variables_from_random_forest(merlin_city_data_fixed_single_scale)
[1] "merlin_pool_size" "realm" "biome_name"
[4] "happiness_positive_effect" "rainfall_monthly_min" "temperature_annual_average"
[7] "region_20km_elevation_delta" "happiness_future_life" "temperature_monthly_min"
[10] "permanent_water" "shrubs" "region_20km_urban"
[13] "city_gdp_per_population" "region_20km_cultivated" "happiness_negative_effect"
[16] "share_of_population_within_400m_of_open_space" "city_average_pop_density" "temperature_monthly_max"
[19] "region_50km_average_pop_density" "herbaceous_wetland" "rainfall_annual_average"
[22] "rainfall_monthly_max" "city_max_pop_density" "mean_population_exposure_to_pm2_5_2019"
[25] "percentage_urban_area_as_open_public_spaces" "city_mean_elevation" "cultivated"
[28] "city_elevation_delta" "urban" "population_growth"
[31] "percentage_urban_area_as_open_public_spaces_and_streets" "open_forest" "percentage_urban_area_as_streets"
[34] "closed_forest"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size")])
[1] "Mean 18.3189688617708 , SD: 0.19715466506265 , Mean + SD: 18.5161235268334"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm")])
[1] "Mean 13.869770185836 , SD: 0.140525627740579 , Mean + SD: 14.0102958135766"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name")])
[1] "Mean 14.1475771572531 , SD: 0.185069369813484 , Mean + SD: 14.3326465270665"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect")])
[1] "Mean 14.5546911926491 , SD: 0.235672741470548 , Mean + SD: 14.7903639341196"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min")])
[1] "Mean 14.5623773013355 , SD: 0.230191728097893 , Mean + SD: 14.7925690294334"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average")])
[1] "Mean 14.6428483218659 , SD: 0.195267494460886 , Mean + SD: 14.8381158163268"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta")])
[1] "Mean 15.0077588158041 , SD: 0.249911538143371 , Mean + SD: 15.2576703539475"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life")])
[1] "Mean 14.8200125391895 , SD: 0.269860068851267 , Mean + SD: 15.0898726080408"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min")])
[1] "Mean 14.8088870728519 , SD: 0.251983887288602 , Mean + SD: 15.0608709601405"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water")])
[1] "Mean 15.052305495549 , SD: 0.267727808160636 , Mean + SD: 15.3200333037096"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs")])
[1] "Mean 15.1497081412429 , SD: 0.216072196026799 , Mean + SD: 15.3657803372697"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban")])
[1] "Mean 15.1341979237493 , SD: 0.214956656108439 , Mean + SD: 15.3491545798577"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population")])
[1] "Mean 15.10571746549 , SD: 0.268032278025023 , Mean + SD: 15.373749743515"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population", "region_20km_cultivated")])
[1] "Mean 15.2546575720185 , SD: 0.215319469958443 , Mean + SD: 15.4699770419769"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population", "region_20km_cultivated", "happiness_negative_effect")])
[1] "Mean 15.2900691333102 , SD: 0.210966597605062 , Mean + SD: 15.5010357309153"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population", "region_20km_cultivated", "happiness_negative_effect", "share_of_population_within_400m_of_open_space")])
[1] "Mean 15.4060817119522 , SD: 0.266427524373179 , Mean + SD: 15.6725092363253"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population", "region_20km_cultivated", "happiness_negative_effect", "share_of_population_within_400m_of_open_space", "city_average_pop_density")])
[1] "Mean 15.6023584170658 , SD: 0.278933771668399 , Mean + SD: 15.8812921887342"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population", "region_20km_cultivated", "happiness_negative_effect", "share_of_population_within_400m_of_open_space", "city_average_pop_density", "temperature_monthly_max")])
[1] "Mean 15.6959782056278 , SD: 0.253663950252537 , Mean + SD: 15.9496421558804"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population", "region_20km_cultivated", "happiness_negative_effect", "share_of_population_within_400m_of_open_space", "city_average_pop_density", "temperature_monthly_max", "region_50km_average_pop_density")])
[1] "Mean 15.690244014838 , SD: 0.237713920089565 , Mean + SD: 15.9279579349276"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population", "region_20km_cultivated", "happiness_negative_effect", "share_of_population_within_400m_of_open_space", "city_average_pop_density", "temperature_monthly_max", "region_50km_average_pop_density", "herbaceous_wetland")])
[1] "Mean 15.8068171344378 , SD: 0.288841008803903 , Mean + SD: 16.0956581432417"
create_fifty_rows_of_oob(merlin_city_data_fixed[,c("response", "merlin_pool_size", "realm", "biome_name", "happiness_positive_effect", "rainfall_monthly_min", "temperature_annual_average", "region_20km_elevation_delta", "happiness_future_life", "temperature_monthly_min", "permanent_water", "shrubs", "region_20km_urban", "city_gdp_per_population", "region_20km_cultivated", "happiness_negative_effect", "share_of_population_within_400m_of_open_space", "city_average_pop_density", "temperature_monthly_max", "region_50km_average_pop_density", "herbaceous_wetland", "rainfall_annual_average")])
[1] "Mean 15.8970003444034 , SD: 0.253898577060915 , Mean + SD: 16.1508989214643"
“merlin_pool_size”, “realm”
birdlife_city_data <- fetch_city_data_for('birdlife')
── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
cols(
name = col_character(),
response = col_double()
)
Joining, by = "name"
birdlife_city_data
birdlife_city_data_fixed <- rfImpute(response ~ ., birdlife_city_data)
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 5.543 87.75 |
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 5.44 86.12 |
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 5.466 86.52 |
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 5.393 85.37 |
| Out-of-bag |
Tree | MSE %Var(y) |
300 | 5.4 85.48 |
birdlife_city_data_fixed
select_variables_from_random_forest(birdlife_city_data_fixed)
[1] "population_growth" "birdlife_pool_size" "region_100km_cultivated"
[4] "biome_name" "region_20km_average_pop_density" "rainfall_monthly_min"
[7] "region_50km_cultivated" "permanent_water" "region_50km_average_pop_density"
[10] "rainfall_monthly_max" "percentage_urban_area_as_open_public_spaces" "temperature_monthly_min"
[13] "mean_population_exposure_to_pm2_5_2019" "region_20km_cultivated" "shrubs"
[16] "region_100km_average_pop_density" "region_100km_urban" "temperature_annual_average"
[19] "region_20km_elevation_delta" "percentage_urban_area_as_open_public_spaces_and_streets" "region_20km_urban"
[22] "percentage_urban_area_as_streets" "city_average_pop_density" "open_forest"
[25] "region_50km_elevation_delta" "region_50km_urban" "share_of_population_within_400m_of_open_space"
[28] "temperature_monthly_max" "realm" "city_max_pop_density"
[31] "happiness_future_life" "rainfall_annual_average" "city_elevation_delta"
[34] "city_gdp_per_population" "happiness_negative_effect" "cultivated"
[37] "closed_forest" "city_mean_elevation" "happiness_positive_effect"
[40] "herbaceous_wetland" "region_100km_elevation_delta" "urban"
[43] "herbaceous_vegetation"
select_variables_from_random_forest(birdlife_city_data_fixed_single_scale)
[1] "population_growth" "birdlife_pool_size" "region_100km_cultivated"
[4] "biome_name" "rainfall_monthly_min" "region_20km_average_pop_density"
[7] "percentage_urban_area_as_open_public_spaces" "permanent_water" "temperature_monthly_min"
[10] "rainfall_monthly_max" "mean_population_exposure_to_pm2_5_2019" "region_100km_urban"
[13] "temperature_annual_average" "shrubs" "region_20km_elevation_delta"
[16] "percentage_urban_area_as_open_public_spaces_and_streets" "share_of_population_within_400m_of_open_space" "open_forest"
[19] "percentage_urban_area_as_streets" "city_elevation_delta" "realm"
[22] "temperature_monthly_max" "rainfall_annual_average" "city_max_pop_density"
[25] "happiness_negative_effect" "happiness_future_life" "city_gdp_per_population"
[28] "closed_forest" "city_mean_elevation" "cultivated"
[31] "happiness_positive_effect" "herbaceous_wetland" "urban"
[34] "herbaceous_vegetation"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth")])
[1] "Mean 6.36812514690974 , SD: 0.0699893081073382 , Mean + SD: 6.43811445501708"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size")])
[1] "Mean 5.520498615513 , SD: 0.0795561100386087 , Mean + SD: 5.60005472555161"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated")])
[1] "Mean 5.04371386558532 , SD: 0.0866595044307178 , Mean + SD: 5.13037337001603"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name")])
[1] "Mean 5.00607385388074 , SD: 0.0749724456600396 , Mean + SD: 5.08104629954078"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min")])
[1] "Mean 4.94875983465646 , SD: 0.0733050112033546 , Mean + SD: 5.02206484585981"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density")])
[1] "Mean 4.89408091448459 , SD: 0.0723301151293599 , Mean + SD: 4.96641102961395"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces")])
[1] "Mean 4.91259542900125 , SD: 0.0832006407574059 , Mean + SD: 4.99579606975865"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water")])
[1] "Mean 4.81573303443048 , SD: 0.0905714601252137 , Mean + SD: 4.90630449455569"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min")])
[1] "Mean 4.82051400444731 , SD: 0.0754282936278812 , Mean + SD: 4.8959422980752"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max")])
[1] "Mean 4.8265637096805 , SD: 0.0818177577747967 , Mean + SD: 4.90838146745529"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019")])
[1] "Mean 4.84852474163507 , SD: 0.0728234804176173 , Mean + SD: 4.92134822205268"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban")])
[1] "Mean 4.821154259606 , SD: 0.0859581869181102 , Mean + SD: 4.90711244652411"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average")])
[1] "Mean 4.87739843945672 , SD: 0.0914594075983258 , Mean + SD: 4.96885784705504"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average", "shrubs")])
[1] "Mean 4.90611791522006 , SD: 0.0795348713685267 , Mean + SD: 4.98565278658859"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average", "shrubs", "region_20km_elevation_delta")])
[1] "Mean 4.95168298717818 , SD: 0.0757784972012371 , Mean + SD: 5.02746148437942"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average", "shrubs", "region_20km_elevation_delta", "percentage_urban_area_as_open_public_spaces_and_streets")])
[1] "Mean 4.9654707422419 , SD: 0.0849784635995637 , Mean + SD: 5.05044920584146"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average", "shrubs", "region_20km_elevation_delta", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space")])
[1] "Mean 5.00044689211819 , SD: 0.0968048521998649 , Mean + SD: 5.09725174431806"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average", "shrubs", "region_20km_elevation_delta", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space", "open_forest")])
[1] "Mean 5.05554461949528 , SD: 0.0870487758868316 , Mean + SD: 5.14259339538211"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average", "shrubs", "region_20km_elevation_delta", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space", "open_forest", "percentage_urban_area_as_streets")])
[1] "Mean 5.07578877604463 , SD: 0.0918425932588158 , Mean + SD: 5.16763136930344"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average", "shrubs", "region_20km_elevation_delta", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space", "open_forest", "percentage_urban_area_as_streets", "city_elevation_delta")])
[1] "Mean 5.0924686777348 , SD: 0.085826973830433 , Mean + SD: 5.17829565156523"
create_fifty_rows_of_oob(birdlife_city_data_fixed[,c("response", "population_growth", "birdlife_pool_size", "region_100km_cultivated", "biome_name", "rainfall_monthly_min", "region_20km_average_pop_density", "percentage_urban_area_as_open_public_spaces", "permanent_water", "temperature_monthly_min", "rainfall_monthly_max", "mean_population_exposure_to_pm2_5_2019", "region_100km_urban", "temperature_annual_average", "shrubs", "region_20km_elevation_delta", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space", "open_forest", "percentage_urban_area_as_streets", "city_elevation_delta", "realm")])
[1] "Mean 5.08565671537218 , SD: 0.0967755533948937 , Mean + SD: 5.18243226876707"
“population_growth”, “birdlife_pool_size”, “region_100km_cultivated”, “biome_name”, “rainfall_monthly_min”, “region_20km_average_pop_density”, “percentage_urban_area_as_open_public_spaces”, “permanent_water”
select_variables_from_random_forest(either_city_data_fixed)
[1] "either_pool_size" "population_growth" "region_100km_cultivated"
[4] "region_20km_average_pop_density" "realm" "region_50km_cultivated"
[7] "region_50km_average_pop_density" "shrubs" "biome_name"
[10] "percentage_urban_area_as_open_public_spaces" "rainfall_monthly_min" "region_20km_cultivated"
[13] "permanent_water" "temperature_monthly_min" "region_100km_average_pop_density"
[16] "region_20km_elevation_delta" "mean_population_exposure_to_pm2_5_2019" "region_20km_urban"
[19] "region_50km_elevation_delta" "city_average_pop_density" "rainfall_monthly_max"
[22] "temperature_annual_average" "percentage_urban_area_as_open_public_spaces_and_streets" "city_elevation_delta"
[25] "share_of_population_within_400m_of_open_space" "temperature_monthly_max" "city_max_pop_density"
[28] "region_50km_urban" "cultivated" "region_100km_urban"
[31] "city_gdp_per_population" "happiness_future_life" "city_mean_elevation"
[34] "herbaceous_wetland" "rainfall_annual_average" "happiness_positive_effect"
[37] "region_100km_elevation_delta" "open_forest" "percentage_urban_area_as_streets"
[40] "urban" "happiness_negative_effect" "herbaceous_vegetation"
[43] "closed_forest"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size")])
[1] "Mean 4.68107781471717 , SD: 0.0529585708192306 , Mean + SD: 4.7340363855364"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth")])
[1] "Mean 4.20940583004367 , SD: 0.0492022724335224 , Mean + SD: 4.25860810247719"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated")])
[1] "Mean 4.09576877863183 , SD: 0.0636465813145703 , Mean + SD: 4.1594153599464"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density")])
[1] "Mean 3.76538827378209 , SD: 0.0527649118617442 , Mean + SD: 3.81815318564383"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm")])
[1] "Mean 3.63107352271867 , SD: 0.0573871316220201 , Mean + SD: 3.68846065434069"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name")])
[1] "Mean 3.89488443708114 , SD: 0.0610036459159636 , Mean + SD: 3.9558880829971"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs")])
[1] "Mean 3.89553458306318 , SD: 0.0689881300982639 , Mean + SD: 3.96452271316145"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces")])
[1] "Mean 3.99073515712685 , SD: 0.0651760898335403 , Mean + SD: 4.05591124696039"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min")])
[1] "Mean 4.04347993514867 , SD: 0.0769460323356499 , Mean + SD: 4.12042596748432"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min")])
[1] "Mean 4.05247857511242 , SD: 0.0758878349158813 , Mean + SD: 4.1283664100283"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta")])
[1] "Mean 4.06957100667791 , SD: 0.0683291852955216 , Mean + SD: 4.13790019197343"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water")])
[1] "Mean 4.09798181582785 , SD: 0.074704438841254 , Mean + SD: 4.17268625466911"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019")])
[1] "Mean 4.12814710453946 , SD: 0.0766454973906898 , Mean + SD: 4.20479260193015"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019", "temperature_annual_average")])
[1] "Mean 4.16715002097077 , SD: 0.0657808913892767 , Mean + SD: 4.23293091236005"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019", "temperature_annual_average", "region_20km_urban")])
[1] "Mean 4.16087925592971 , SD: 0.0848533009464374 , Mean + SD: 4.24573255687614"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019", "temperature_annual_average", "region_20km_urban", "percentage_urban_area_as_open_public_spaces_and_streets")])
[1] "Mean 4.22423118810479 , SD: 0.0683093368105821 , Mean + SD: 4.29254052491537"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019", "temperature_annual_average", "region_20km_urban", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space")])
[1] "Mean 4.26380999451308 , SD: 0.0809731884653065 , Mean + SD: 4.34478318297839"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019", "temperature_annual_average", "region_20km_urban", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space", "rainfall_monthly_max")])
[1] "Mean 4.30231663141395 , SD: 0.0651782253427885 , Mean + SD: 4.36749485675674"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019", "temperature_annual_average", "region_20km_urban", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space", "rainfall_monthly_max", "city_elevation_delta")])
[1] "Mean 4.29139164763849 , SD: 0.0710967981200039 , Mean + SD: 4.3624884457585"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019", "temperature_annual_average", "region_20km_urban", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space", "rainfall_monthly_max", "city_elevation_delta", "herbaceous_wetland")])
[1] "Mean 4.33184364849796 , SD: 0.0785950234481419 , Mean + SD: 4.4104386719461"
create_fifty_rows_of_oob(either_city_data_fixed[,c("response", "either_pool_size", "population_growth", "region_100km_cultivated", "region_20km_average_pop_density", "realm", "biome_name", "shrubs", "percentage_urban_area_as_open_public_spaces", "rainfall_monthly_min", "temperature_monthly_min", "region_20km_elevation_delta", "permanent_water", "mean_population_exposure_to_pm2_5_2019", "temperature_annual_average", "region_20km_urban", "percentage_urban_area_as_open_public_spaces_and_streets", "share_of_population_within_400m_of_open_space", "rainfall_monthly_max", "city_elevation_delta", "herbaceous_wetland", "temperature_monthly_max")])
[1] "Mean 4.38537704857627 , SD: 0.0710889177339408 , Mean + SD: 4.45646596631021"
“either_pool_size”, “population_growth”, “region_100km_cultivated”, “region_20km_average_pop_density”, “realm”
select_variables_from_random_forest(both_city_data_fixed)
[1] "both_pool_size" "temperature_annual_average" "happiness_negative_effect"
[4] "temperature_monthly_min" "permanent_water" "region_100km_cultivated"
[7] "region_20km_urban" "region_50km_cultivated" "region_20km_cultivated"
[10] "realm" "rainfall_monthly_min" "region_50km_elevation_delta"
[13] "percentage_urban_area_as_open_public_spaces" "shrubs" "happiness_positive_effect"
[16] "happiness_future_life" "population_growth" "city_gdp_per_population"
[19] "region_100km_elevation_delta" "region_20km_average_pop_density" "region_100km_urban"
[22] "biome_name" "city_average_pop_density" "region_20km_elevation_delta"
[25] "share_of_population_within_400m_of_open_space" "open_forest" "region_50km_urban"
[28] "region_50km_average_pop_density" "herbaceous_wetland" "region_100km_average_pop_density"
[31] "mean_population_exposure_to_pm2_5_2019" "cultivated" "city_elevation_delta"
[34] "city_mean_elevation" "percentage_urban_area_as_open_public_spaces_and_streets" "rainfall_monthly_max"
[37] "temperature_monthly_max" "herbaceous_vegetation" "rainfall_annual_average"
[40] "city_max_pop_density" "percentage_urban_area_as_streets" "closed_forest"
[43] "urban"
select_variables_from_random_forest(both_city_data_fixed_single_scale)
[1] "both_pool_size" "temperature_annual_average" "happiness_negative_effect"
[4] "temperature_monthly_min" "permanent_water" "region_20km_urban"
[7] "region_100km_cultivated" "rainfall_monthly_min" "percentage_urban_area_as_open_public_spaces"
[10] "realm" "happiness_positive_effect" "population_growth"
[13] "region_50km_elevation_delta" "shrubs" "city_gdp_per_population"
[16] "happiness_future_life" "biome_name" "share_of_population_within_400m_of_open_space"
[19] "open_forest" "herbaceous_wetland" "percentage_urban_area_as_open_public_spaces_and_streets"
[22] "cultivated" "city_mean_elevation" "rainfall_monthly_max"
[25] "temperature_monthly_max" "rainfall_annual_average" "percentage_urban_area_as_streets"
[28] "urban"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size")])
[1] "Mean 17.0573842982199 , SD: 0.158781230508028 , Mean + SD: 17.2161655287279"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average")])
[1] "Mean 14.2265193200808 , SD: 0.182715311029114 , Mean + SD: 14.4092346311099"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect")])
[1] "Mean 13.2974151408976 , SD: 0.172029531337893 , Mean + SD: 13.4694446722355"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water")])
[1] "Mean 13.6495184580861 , SD: 0.19661723337752 , Mean + SD: 13.8461356914636"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban")])
[1] "Mean 13.6847138614015 , SD: 0.187512025671624 , Mean + SD: 13.8722258870732"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated")])
[1] "Mean 13.7495989636209 , SD: 0.179353121798753 , Mean + SD: 13.9289520854196"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min")])
[1] "Mean 13.9191705203945 , SD: 0.23616544608524 , Mean + SD: 14.1553359664797"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces")])
[1] "Mean 13.9485914160613 , SD: 0.242665314884572 , Mean + SD: 14.1912567309459"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm")])
[1] "Mean 13.8436723181486 , SD: 0.221888792323216 , Mean + SD: 14.0655611104718"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect")])
[1] "Mean 14.1571192594309 , SD: 0.2465479866693 , Mean + SD: 14.4036672461002"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth")])
[1] "Mean 14.2786575486517 , SD: 0.216411051843621 , Mean + SD: 14.4950686004953"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta")])
[1] "Mean 14.5934288195255 , SD: 0.229445483984334 , Mean + SD: 14.8228743035098"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta", "shrubs")])
[1] "Mean 14.5951110959139 , SD: 0.243846125678944 , Mean + SD: 14.8389572215928"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta", "shrubs", "city_gdp_per_population")])
[1] "Mean 14.6975056748365 , SD: 0.215913195328559 , Mean + SD: 14.913418870165"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta", "shrubs", "city_gdp_per_population", "happiness_future_life")])
[1] "Mean 14.7782428837829 , SD: 0.250968471155811 , Mean + SD: 15.0292113549388"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta", "shrubs", "city_gdp_per_population", "happiness_future_life", "biome_name")])
[1] "Mean 14.6204321113383 , SD: 0.213853154272812 , Mean + SD: 14.8342852656111"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta", "shrubs", "city_gdp_per_population", "happiness_future_life", "biome_name", "share_of_population_within_400m_of_open_space")])
[1] "Mean 14.8111407511192 , SD: 0.265464036798428 , Mean + SD: 15.0766047879176"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta", "shrubs", "city_gdp_per_population", "happiness_future_life", "biome_name", "share_of_population_within_400m_of_open_space", "open_forest")])
[1] "Mean 14.9223527775334 , SD: 0.223852815096881 , Mean + SD: 15.1462055926303"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta", "shrubs", "city_gdp_per_population", "happiness_future_life", "biome_name", "share_of_population_within_400m_of_open_space", "open_forest", "herbaceous_wetland")])
[1] "Mean 14.9490556934422 , SD: 0.264567696391672 , Mean + SD: 15.2136233898338"
create_fifty_rows_of_oob(both_city_data_fixed[,c("response", "both_pool_size", "temperature_annual_average", "happiness_negative_effect", "permanent_water", "region_20km_urban", "region_100km_cultivated", "rainfall_monthly_min", "percentage_urban_area_as_open_public_spaces", "realm", "happiness_positive_effect", "population_growth", "region_50km_elevation_delta", "shrubs", "city_gdp_per_population", "happiness_future_life", "biome_name", "share_of_population_within_400m_of_open_space", "open_forest", "herbaceous_wetland", "percentage_urban_area_as_open_public_spaces_and_streets")])
[1] "Mean 15.0828378915462 , SD: 0.249182576727487 , Mean + SD: 15.3320204682737"
“both_pool_size”, “temperature_annual_average”, “happiness_negative_effect”
| So…. |
|---|
| “merlin_pool_size”, “realm” “population_growth”, “birdlife_pool_size”, “region_100km_cultivated”, “biome_name”, “rainfall_monthly_min”, “region_20km_average_pop_density”, “percentage_urban_area_as_open_public_spaces”, “permanent_water” “either_pool_size”, “population_growth”, “region_100km_cultivated”, “region_20km_average_pop_density”, “realm” “both_pool_size”, “temperature_annual_average”, “happiness_negative_effect” |
| ```r summary(lm(response ~ merlin_pool_size, merlin_city_data_fixed)) |
| ``` |
| ``` |
| Call: lm(formula = response ~ merlin_pool_size, data = merlin_city_data_fixed) |
| Residuals: Min 1Q Median 3Q Max -8.3644 -2.2493 -0.3649 1.7804 15.4604 |
| Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.205975 0.920945 6.739 4.23e-10 merlin_pool_size -0.022439 0.003134 -7.160 4.71e-11 |
Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.641 on 135 degrees of freedom Multiple R-squared: 0.2752, Adjusted R-squared: 0.2698 F-statistic: 51.26 on 1 and 135 DF, p-value: 4.707e-11
<!-- rnb-output-end -->
<!-- rnb-source-begin eyJkYXRhIjoiYGBgclxuc3VtbWFyeShsbShyZXNwb25zZSB+IGJpcmRsaWZlX3Bvb2xfc2l6ZSwgYmlyZGxpZmVfY2l0eV9kYXRhX2ZpeGVkKSlcbmBgYCJ9 -->
```r
summary(lm(response ~ birdlife_pool_size, birdlife_city_data_fixed))
Call:
lm(formula = response ~ birdlife_pool_size, data = birdlife_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-5.140 -1.330 -0.313 1.034 9.156
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.602931 0.625873 4.159 5.65e-05 ***
birdlife_pool_size -0.008789 0.002000 -4.395 2.23e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.368 on 135 degrees of freedom
Multiple R-squared: 0.1252, Adjusted R-squared: 0.1187
F-statistic: 19.31 on 1 and 135 DF, p-value: 2.225e-05
summary(lm(response ~ either_pool_size, either_city_data_fixed))
Call:
lm(formula = response ~ either_pool_size, data = either_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-4.8488 -1.0658 -0.3811 0.8665 6.5921
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.250304 0.584389 5.562 1.38e-07 ***
either_pool_size -0.009005 0.001546 -5.825 3.99e-08 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.031 on 135 degrees of freedom
Multiple R-squared: 0.2008, Adjusted R-squared: 0.1949
F-statistic: 33.92 on 1 and 135 DF, p-value: 3.99e-08
summary(lm(response ~ both_pool_size, both_city_data_fixed))
Call:
lm(formula = response ~ both_pool_size, data = both_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-8.9674 -2.7370 -0.3475 1.8439 10.3398
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.261657 0.982371 5.356 3.56e-07 ***
both_pool_size -0.024842 0.004396 -5.651 9.08e-08 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.667 on 135 degrees of freedom
Multiple R-squared: 0.1913, Adjusted R-squared: 0.1853
F-statistic: 31.94 on 1 and 135 DF, p-value: 9.076e-08
summary(lm(response ~ region_100km_cultivated, merlin_city_data_fixed))
Call:
lm(formula = response ~ region_100km_cultivated, data = merlin_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-8.7405 -2.8276 -0.5911 1.5098 18.0590
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.6281 0.5172 -1.214 0.2267
region_100km_cultivated 2.3444 1.3805 1.698 0.0918 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 4.232 on 135 degrees of freedom
Multiple R-squared: 0.02092, Adjusted R-squared: 0.01366
F-statistic: 2.884 on 1 and 135 DF, p-value: 0.09176
summary(lm(response ~ region_100km_cultivated, birdlife_city_data_fixed))
Call:
lm(formula = response ~ region_100km_cultivated, data = birdlife_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-4.4506 -1.5884 -0.3702 1.3865 9.9581
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.6226 0.3002 -2.074 0.04001 *
region_100km_cultivated 2.3237 0.8013 2.900 0.00436 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.457 on 135 degrees of freedom
Multiple R-squared: 0.05864, Adjusted R-squared: 0.05167
F-statistic: 8.409 on 1 and 135 DF, p-value: 0.004359
summary(lm(response ~ region_100km_cultivated, either_city_data_fixed))
Call:
lm(formula = response ~ region_100km_cultivated, data = either_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-4.6522 -1.4255 -0.2114 0.9771 6.3724
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.5459 0.2698 -2.024 0.04499 *
region_100km_cultivated 2.0373 0.7200 2.830 0.00537 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.207 on 135 degrees of freedom
Multiple R-squared: 0.05599, Adjusted R-squared: 0.049
F-statistic: 8.008 on 1 and 135 DF, p-value: 0.00537
summary(lm(response ~ region_100km_cultivated, both_city_data_fixed))
Call:
lm(formula = response ~ region_100km_cultivated, data = both_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-8.439 -2.791 -0.689 1.898 12.088
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.7221 0.4908 -1.471 0.1436
region_100km_cultivated 2.6951 1.3099 2.057 0.0416 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 4.016 on 135 degrees of freedom
Multiple R-squared: 0.0304, Adjusted R-squared: 0.02322
F-statistic: 4.233 on 1 and 135 DF, p-value: 0.04157
ggplot() +
geom_point(aes(x = merlin_pool_size, y = region_100km_cultivated), merlin_city_data_fixed, color = "red") +
geom_point(aes(x = birdlife_pool_size, y = region_100km_cultivated), birdlife_city_data_fixed, color = "blue") +
geom_point(aes(x = either_pool_size, y = region_100km_cultivated), either_city_data_fixed, color = "green") +
geom_point(aes(x = both_pool_size, y = region_100km_cultivated), both_city_data_fixed, color = "purple")
summary(lm(response ~ population_growth, merlin_city_data_fixed))
Call:
lm(formula = response ~ population_growth, data = merlin_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-9.2751 -2.8391 -0.4272 1.4837 18.4058
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.094091 0.524516 0.179 0.858
population_growth -0.001479 0.005915 -0.250 0.803
Residual standard error: 4.276 on 135 degrees of freedom
Multiple R-squared: 0.0004627, Adjusted R-squared: -0.006941
F-statistic: 0.0625 on 1 and 135 DF, p-value: 0.803
summary(lm(response ~ population_growth, birdlife_city_data_fixed))
Call:
lm(formula = response ~ population_growth, data = birdlife_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-5.085 -1.538 -0.459 1.240 10.226
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.231365 0.309332 0.748 0.456
population_growth -0.003636 0.003489 -1.042 0.299
Residual standard error: 2.522 on 135 degrees of freedom
Multiple R-squared: 0.007984, Adjusted R-squared: 0.0006359
F-statistic: 1.087 on 1 and 135 DF, p-value: 0.2991
summary(lm(response ~ population_growth, either_city_data_fixed))
Call:
lm(formula = response ~ population_growth, data = either_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-5.1409 -1.3284 -0.1829 0.8324 6.7919
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.113195 0.278318 0.407 0.685
population_growth -0.001779 0.003139 -0.567 0.572
Residual standard error: 2.269 on 135 degrees of freedom
Multiple R-squared: 0.002374, Adjusted R-squared: -0.005016
F-statistic: 0.3213 on 1 and 135 DF, p-value: 0.5718
summary(lm(response ~ population_growth, both_city_data_fixed))
Call:
lm(formula = response ~ population_growth, data = both_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-9.1143 -2.5568 -0.7818 2.1289 12.4621
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.188410 0.499736 0.377 0.707
population_growth -0.002961 0.005636 -0.525 0.600
Residual standard error: 4.074 on 135 degrees of freedom
Multiple R-squared: 0.002041, Adjusted R-squared: -0.005351
F-statistic: 0.2761 on 1 and 135 DF, p-value: 0.6001
summary(lm(response ~ rainfall_monthly_min, merlin_city_data_fixed))
Call:
lm(formula = response ~ rainfall_monthly_min, data = merlin_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-9.2835 -2.9452 -0.4893 1.4983 18.2505
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.191459 0.491332 0.390 0.697
rainfall_monthly_min -0.007481 0.012853 -0.582 0.562
Residual standard error: 4.272 on 135 degrees of freedom
Multiple R-squared: 0.002503, Adjusted R-squared: -0.004886
F-statistic: 0.3387 on 1 and 135 DF, p-value: 0.5615
summary(lm(response ~ rainfall_monthly_min, birdlife_city_data_fixed))
Call:
lm(formula = response ~ rainfall_monthly_min, data = birdlife_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-5.0114 -1.4084 -0.4231 1.3632 10.6767
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.244199 0.289526 0.843 0.40
rainfall_monthly_min -0.009541 0.007574 -1.260 0.21
Residual standard error: 2.517 on 135 degrees of freedom
Multiple R-squared: 0.01162, Adjusted R-squared: 0.004298
F-statistic: 1.587 on 1 and 135 DF, p-value: 0.2099
summary(lm(response ~ rainfall_monthly_min, either_city_data_fixed))
Call:
lm(formula = response ~ rainfall_monthly_min, data = either_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-5.1121 -1.3720 -0.2964 0.8111 6.5298
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.219743 0.259756 0.846 0.399
rainfall_monthly_min -0.008586 0.006795 -1.264 0.209
Residual standard error: 2.258 on 135 degrees of freedom
Multiple R-squared: 0.01169, Adjusted R-squared: 0.004367
F-statistic: 1.597 on 1 and 135 DF, p-value: 0.2086
summary(lm(response ~ rainfall_monthly_min, both_city_data_fixed))
Call:
lm(formula = response ~ rainfall_monthly_min, data = both_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-9.0991 -2.8506 -0.8491 1.9009 12.2257
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.30602 0.46742 0.655 0.514
rainfall_monthly_min -0.01196 0.01223 -0.978 0.330
Residual standard error: 4.064 on 135 degrees of freedom
Multiple R-squared: 0.007033, Adjusted R-squared: -0.0003223
F-statistic: 0.9562 on 1 and 135 DF, p-value: 0.3299
summary(lm(response ~ biome_name, merlin_city_data_fixed))
Call:
lm(formula = response ~ biome_name, data = merlin_city_data_fixed)
Residuals:
Min 1Q Median 3Q Max
-8.7663 -2.4594 -0.4676 2.1272 18.4309
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -3.2599 4.2666 -0.764 0.4463
biome_nameDeserts & Xeric Shrublands 3.1836 4.4563 0.714 0.4763
biome_nameFlooded Grasslands & Savannas 0.6618 5.2255 0.127 0.8994
biome_nameMangroves 9.3150 5.2255 1.783 0.0771 .
biome_nameMediterranean Forests, Woodlands & Scrub 3.2643 4.4066 0.741 0.4602
biome_nameMontane Grasslands & Shrublands 1.5344 5.2255 0.294 0.7695
biome_nameTemperate Broadleaf & Mixed Forests 3.2942 4.3328 0.760 0.4485
biome_nameTemperate Conifer Forests 3.3572 5.2255 0.642 0.5218
biome_nameTemperate Grasslands, Savannas & Shrublands 4.3835 4.6739 0.938 0.3501
biome_nameTropical & Subtropical Coniferous Forests 7.4846 5.2255 1.432 0.1546
biome_nameTropical & Subtropical Dry Broadleaf Forests 3.7631 4.4164 0.852 0.3958
biome_nameTropical & Subtropical Grasslands, Savannas & Shrublands 5.9138 4.6739 1.265 0.2081
biome_nameTropical & Subtropical Moist Broadleaf Forests 2.4622 4.3148 0.571 0.5693
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 4.267 on 124 degrees of freedom
Multiple R-squared: 0.08597, Adjusted R-squared: -0.002489
F-statistic: 0.9719 on 12 and 124 DF, p-value: 0.4793
| In Summary |
Response is related to number of species in regional pool, the more species, the less the percentage of species in the city. Indicating a fixed number of species are able to move into cities. The size of the regional pool is correlated with both the amount of urban and cultivated land cover, both reduce species in the regional pool.
Response is also lower in wet biomes and areas of the world, this is seen through the higher rainfall in the month with least rainfall in the year, and lower percentages in wetter biomes such as flooded grasslands and moist broadleaf forests.
Finally cities with a higher proportion of green public space are less likely to have a low response.